package com.mzw.huaxiarealestatebackend.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mzw.huaxiarealestatebackend.entity.User;
import com.mzw.huaxiarealestatebackend.entity.UserRole;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.domain.Pageable;
import java.util.List;

/**
 * (UserRole)表数据库访问层
 *
 * @author makejava
 * @since 2024-01-02 09:14:29
 */
public interface UserRoleDao extends BaseMapper<UserRole> {

    /**
     * 根据userRoleName查询UserRole对象
     * @param userRoleName
     * @return
     */
    @Select("SELECT * FROM user_role WHERE user_role_name = #{userRoleName}")
    UserRole queryByUserRoleName(String userRoleName);

    /**
     * 通过ID查询单条数据
     *
     * @param userRoleId 主键
     * @return 实例对象
     */
    UserRole queryById(String userRoleId);

    /**
     * 修改数据
     *
     * @param userRole 实例对象
     * @return 影响行数
     */
    int update(UserRole userRole);


}

